@extends('akl.Admin.Base-index')
@section('content')
<style>
	.pagenav li{ display: inline-block;}
	.pagenav ul{ margin-left: 70%;margin-top: 20px }
</style>
<script>
	$('#left-bar .nav>li:nth-child(1)>.menu').addClass('on');
</script>
<div class="main-menu fadeInLeft">
	<div class="title">
		<i class="fa fa-file-text-o"></i> 文章列表
	</div>
	<ul class="act-list">
		<li>
			<a href="/Admin/Article/add"><i class="fa fa-plus-square-o"></i>添加文章</a>
		</li>
	</ul>
</div>
<div class="main-wrap fadeInRight">
	<p style="color: red"><?php
		if(!is_object($errors)){
			echo $errors;
		}?>
	</p>
	<table class="tablePanel">
		<tr>
			<th>ID</th>
			<th>发布时间</th>
			<th>标题</th>
			<th>分类</th>
			<th>作者</th>
			<th>操作</th>
		</tr>
		@foreach($article as $sort)
			<tr>
				<td>{{$sort->id}}</td>
				<td>{{$sort->created_at}}</td>
				<td>{{$sort->title}}</td>
				<td>{{ $sort->class}}</td>
				<td>{{$sort->users_id}}</td>

				<td><a class="act-btn" href="/Admin/Article/dele/id/{{$sort->id}}" onclick="return confirm('确实要删除吗？')">删除</a>
                    <a class="act-btn" href="/Admin/Article/update/id/{{$sort->id}}">编辑</a></td>
			</tr>
		@endforeach

	</table>
	<div class="pagenav">
		{{ $article->links() }}
	</div>
</div>

@endsection